<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/stylesheets/album_index.css">

    <title></title>
  </head>
  <body>


    <nav>
    <button class="btn btn-primary btn-md" type="button" name="button" data-toggle="modal" data-target="#createAlbum">createAlbum</button>
    <form id="uploadForm" enctype="multipart/form-data">
      <input type="file" id="uploadFile"name="" value="">
      <button class="btn btn-primary btn-md" id="uploadFileBtn" type="button" name="button">uploadImg</button>
    </form>
    <div class="modal fade" id="createAlbum" tabindex="-1" role="dialog" aria-labelledby="createAlbumLabel" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="createAlbumLabel">创建相册</h4>
          </div>
          <div class="modal-body">
            <input type="text" name="" placeholder="相册名称" id="albumName" value="">
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal" name="button">关闭</button>
            <button type="button" class="btn btn-primary" onclick="return uploadAlbum();" name="button">提交</button>
            <span id="tip"> </span>
          </div>
        </div>
      </div>
    </div>
    </nav>
    <div class="container-fluid">
      <div class="row album">
        <div class="col-xs-2 col-sm-2 col-md-3 col-lg-2">
          <% for(album_name of albumName){ %>
            <button type="button" class="btn btn-primary btn-lg" onclick="clickAlbum(event);" name="button"><%=album_name.name%></button>
          <% } %>
        </div>
        <div class="col-xs-10 col-sm-10 col-md-9 col-lg-10 img-list">
          <% if(album){ %>
            <% for(item of album){ %>
            <img src="/img/<%=item.filename%>" alt="">

            <% } %>
          <% } %>

        </div>
      </div>
    </div>

  <script type="text/javascript" src="/javascripts/index.js">

  </script>
  </body>
</html>
